/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package izsla.beans;

import izsla.entities.TripUser;
import javax.faces.context.FacesContext;

/**
 *
 * @author aki
 */
public class UserInfo {
    private TripUser user = null;

    public UserInfo() {
    }

    public TripUser getUser() {
	user = null;
	try {
	    user = (TripUser)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("user");
	}
	catch(Exception e) {}
	return user;
    }

    public boolean getLoggedIn() {
	return getUser() != null;
    }
}
